﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" 
Inherits="Nivdal.TranslateMatchSentences" Title="Match sentences translation - Nivdal.com!" Theme="SkinFile" Codebehind="TranslateMatchSentences.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="Label1" runat="server" Text="<%$ Resources:Resource, Translate_PageNameLabelText %>" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">

        <asp:HiddenField ID="LanguageHiddenField" runat="server" />
        <asp:UpdatePanel ID="TranslateUpdatePanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:FormView ID="StatusForumView" runat="server" DataSourceID="TranslationStatusDataSourse">
                <ItemTemplate>
                    <asp:Label ID="TranslationTitleLabel" runat="server" Text="Match sentences translation" SkinID="TeamNameLabel"></asp:Label>
                    <div style="width:20px; height:20px; padding:2px;">
                        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="TranslateUpdatePanel">
                            <ProgressTemplate>
                                <asp:Image ID="ProgressImage" runat="server" ImageUrl="~/Images/ajax-loader.gif" />
                            </ProgressTemplate>
                        </asp:UpdateProgress>
                    </div>
                    <asp:Label ID="LanguageDefinitionLabel" runat="server" Text='<%# TranslationLanguageString(Eval("LanguageName")) %>' SkinID="InfoLabel"></asp:Label>
                    <br />
                    <asp:Label ID="StatusTitleLabel" runat="server" Text="<%$ Resources:Resource, Translate_StatusTitleLabelText %>"
                     SkinID="InfoLabel"></asp:Label>
                     &nbsp;
                    <asp:Label ID="TranslationStatusLabel" runat="server" Text='<%# Eval("TranslationStatus") %>' SkinID="GridLabel"></asp:Label>
                     <br />
                    <asp:HyperLink ID="ToTranslationHomePage" runat="server" Text="Back to translation home page"
                     NavigateUrl="~/TranslateMaster.aspx" SkinID="GreenTitleHyperLink"></asp:HyperLink>
                </ItemTemplate>
            </asp:FormView>
            <asp:Label ID="MessageLabel" runat="server" SkinID="GreenSmallHeaderLabel"></asp:Label>
            <br />
            <asp:ListView ID="MatchSentenceTranslateListView" runat="server" DataSourceID="TranslateDataSource">
                <LayoutTemplate>
                    <asp:Label ID="itemplaceholder" runat="server"></asp:Label>
                    <asp:Button ID="SubmitButton" runat="server" Text="<%$ Resources:Resource, Global_Submit %>"
                     Message="<%$ Resources:Resource, Translate_SubmitTranslationOnClientClick %>" CssClass="GreenSmallButtonStyle"
                     OnClientClick='return confirm(this.getAttribute("message"))' OnClick="SubmitButtonClick" />
                     &nbsp;&nbsp;
                    <asp:Button ID="SkipButton" runat="server" Text="<%$ Resources:Resource, Translate_SkipAdminNewsButton %>"
                    Message="<%$ Resources:Resource, Translate_SkipAdminNewsButtonOnClientClick %>" CssClass="GreenSmallButtonStyle" 
                    OnClientClick='return confirm(this.getAttribute("message"))' OnClick="SkipSentence"/>
                </LayoutTemplate>
                <ItemTemplate>
                    <asp:HiddenField ID="SentenceNumHiddenField" runat="server" Value='<%# Eval("SentenceNum") %>' />
                    <asp:HiddenField ID="PartHiddenField" runat="server" Value='<%# Eval("Part") %>'/>
                    <asp:HiddenField ID="EventTypeHiddenField" runat="server" Value='<%# Eval("EventType") %>' />
                    <asp:HiddenField ID="Param1HiddenField" runat="server" Value='<%# Eval("Param1") %>' />
                    <asp:HiddenField ID="Param2HiddenField" runat="server" Value='<%# Eval("Param2") %>' />
                    <asp:HiddenField ID="Param3HiddenField" runat="server" Value='<%# Eval("Param3") %>' />
                    <asp:HiddenField ID="SentenseNumberHiddenField" runat="server" Value='<%# Eval("SentenseNumber") %>' />
                    <table style="width:100%;">
                        <asp:Panel ID="DescriptionPanel" runat="server" Visible='<%# DescriptionExists(Eval("Description")) %>'>                     
                            <tr>
                                <td colspan="3">
                                    <asp:Label ID="NextSentenceTitleLabel" runat="server" Text="Next sentence to translate is:" SkinID="InfoLabel"></asp:Label>
                                    <br />
                                    <asp:Label ID="DescriptionLabel" runat="server" Text='<%# Eval("Description") %>' SkinID="GridLabel"></asp:Label>
                                </td>
                            </tr>
                        </asp:Panel>
                        <tr>
                            <td style="width:20%;">
                                <asp:Label ID="EnglishTextTitleLabel" runat="server" Text="<%$ Resources:Resource, Translate_EnglishSentenceTitleLabel %>"
                                 SkinID="InfoLabel"></asp:Label>
                            </td>
                            <td style="width:60%;">
                                <asp:Label ID="EnglishTextLabel" runat="server" Text='<%# Eval("Data") %>' SkinID="GridLabel"></asp:Label>
                            </td>
                            <td style="width:20%;">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="TranslationTitleLabel" runat="server" Text="<%$ Resources:Resource, Translate_YourTranslationTitleLabel %>"
                                 SkinID="InfoLabel"></asp:Label>
                            </td>
                            <td>
                                <CustomControls:TextArea ID="TranslateTextBox" runat="server" Width="300" Height="80" 
                                TextMode="MultiLine" MaxLength="1024"></CustomControls:TextArea>
                            </td>
                            <td>
                                <asp:Label ID="SeparatorLabel" runat="server" Text='<%# Eval("Separator") %>' SkinID="GridLabel"></asp:Label>
                            </td>
                        </tr>
                    </table>  
                </ItemTemplate>
        
            </asp:ListView>
    
    
    
    
            <asp:SqlDataSource ID="TranslateDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetNextMatchSentenceToTranslate" SelectCommandType="StoredProcedure" ></asp:SqlDataSource>
            <asp:SqlDataSource ID="TranslationStatusDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
              SelectCommand="Nivdal_GetMatchSentencesTranslationStatusForUser" SelectCommandType="StoredProcedure"></asp:SqlDataSource>    
        </ContentTemplate>
        </asp:UpdatePanel>
        <br /><br />
        <asp:HyperLink ID="TranslatedSentencesHyperlink" runat="server" SkinID="GreenTitleHyperLink" NavigateUrl="~/MatschSentencesTranslated.aspx"
         Text="All translated and skipped sentences"></asp:HyperLink>
    
    </div>
    </div>
</asp:Content>



<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" Runat="Server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, Translate_PageNameLabelText %>" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>

